class Cliente < ActiveRecord::Base
  belongs_to :gateway, :foreign_key => 'gtw_id'
  belongs_to :anchob, :foreign_key => 'ancho_id'
  belongs_to :acelerador, :foreign_key => 'acelerador_id'
  require 'servicio'
  
  def self.start    
      Servicio.iniciar
  end
  
  def self.stop
      Servicio.detener
  end
  
  def self.restart
      self.stop
      self.start
  end
end
